import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

// ignore: must_be_immutable
class YBCustomAppBar extends PreferredSize {
  Widget childView;

  final Size preferredSize;

  YBCustomAppBar({this.preferredSize,this.childView});

  @override
  Widget build(BuildContext context) {
    Widget current = childView;
    if (childView == null){
       current = LimitedBox(
         maxWidth: 0.0,
         maxHeight: 0.0,
         child: ConstrainedBox(
             constraints: BoxConstraints.expand()
         ),
       );
    }
    return current;

  }


}